﻿///***************************************************************
/// 시  스  템 : Updms.Common.Inc
/// 단위시스템 : INC
/// 계      층 : Presentation Layer
/// 프로그램명 : SolutionInfo
/// 파  일  명 : SolutionInfo.aspx.cs
/// 설      명 : 솔루션정보
///***************************************************************
/// 수정ID 일자       이름     내용
///---------------------------------------------------------------
/// CH001  2008-08-29 송시명   최초 작성
///***************************************************************
using System;
using System.IO;

using SMFramework.Configuration;
using SMFramework.Utility;

using Updms.Cfg.Exe;


namespace Updms.Common.Inc
{
	public partial class SolutionInfo : System.Web.UI.Page
	{
		#region Page_Load

		protected void Page_Load(object sender, EventArgs e)
		{
		}
		
		#endregion

		#region SetScript, ChartFX

		private string SetScript(string ls_cd)
		{
			string ls_temp = "";
			string ls_result = "";

			using (Cfg1011m_NT _Cfg1011m_NT = new Cfg1011m_NT())
			{
				ls_temp = _Cfg1011m_NT.GetSettingValueByCd(ls_cd);
			}
			
			ls_result = (ls_temp.Trim().Length > 0) ? ls_temp : DateUtil.GetNow("yyyy-MM-dd");
			
			return ls_result;

		}

		public String ChartFX()
		{
			string chartfx_path = WebConfig.Updms["Chart.Install.Path"];
			string ls_script = "";
			string ls_date = "";
			
			if (Directory.Exists(chartfx_path))
			{
				ls_date = Directory.GetLastWriteTime(chartfx_path).ToShortDateString();
				string ls_diff_day = DateUtil.GetDiffDay(ls_date, DateUtil.GetNow(), true);
				ls_script = ls_date + " | <font color=\"red\">" + ls_diff_day + "</font> Day [ ChartFX 7 ]";
			}
			else
			{
				ls_script = "<font color=\"red\">ChartFX is not installed</font>";
			}

			return ls_script;
		}

		#endregion

		#region SetTimeStamp

		//SetLastVer
		public String SetTimeStamp()
		{
			return WebConfig.Updms["App.TimeStamp"];
		}

		#endregion
	}
}
